package com.tledu.production.service.device.impl;

import com.tledu.production.mapper.device.DeviceMaintainMapper;
import com.tledu.production.model.device.DeviceMaintain;
import com.tledu.production.service.device.DeviceMaintainService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;


@AllArgsConstructor
@Service
public class DeviceMaintainServiceImpl implements DeviceMaintainService {

    private final DeviceMaintainMapper deviceMaintainMapper;

    //分页
    @Override
    public List<DeviceMaintain> list() {
        return deviceMaintainMapper.list();
    }

    //添加
    @Override
    public int insert(DeviceMaintain deviceMaintain) {
        return deviceMaintainMapper.insert(deviceMaintain);
    }


    //更新
    @Override
    public int update(DeviceMaintain deviceMaintain) {
        return deviceMaintainMapper.update(deviceMaintain);
    }


    //删除
    @Override
    public int delete(String deviceMaintainId){
        return deviceMaintainMapper.delete(deviceMaintainId);
    }

    //根据id查询
    @Override
    public DeviceMaintain findById(String deviceMaintainId) {
        return deviceMaintainMapper.findById(deviceMaintainId);
    }

    //分类查询
    @Override
    public List<DeviceMaintain> search(String type, String searchText) {
        return deviceMaintainMapper.search(type, searchText);
    }

    //富文本
    @Override
    public String findEdit(String deviceMaintainId) {
        return deviceMaintainMapper.findEdit(deviceMaintainId);
    }

    //富文本保存
    @Override
    public int save(String deviceMaintainId) {
        return deviceMaintainMapper.save(deviceMaintainId);
    }
}
